
import 'dart:convert';
import 'package:ichinesereader/models/student/StudentItem.dart';

SchoolStudents schoolStudentsFromJson(String str) =>
    SchoolStudents.fromJson(json.decode(str));

String schoolStudentsToJson(SchoolStudents data) => json.encode(data.toJson());

class SchoolStudents {
  SchoolStudents({
    this.list,
    this.total,
  });

  List<StudentItem>? list;
  int? total;

  factory SchoolStudents.fromJson(Map<String, dynamic> json) => SchoolStudents(
        list: json["list"]!=null ? List<StudentItem>.from(
            json["list"].map((x) => StudentItem.fromJson(x))) : null,
        total: json["total"],
      );

  Map<String, dynamic> toJson() => {
        "list": List<dynamic>.from(list!.map((x) => x.toJson())),
        "total": total,
      };
}

// class ListElement {
//   ListElement({
//     this.accessCode,
//     this.classNames,
//     this.dateOfBirth,
//     this.deleted,
//     this.disabled,
//     this.email,
//     this.excludeFromLeaderboard,
//     this.firstName,
//     this.gameDisable,
//     this.gender,
//     this.id,
//     this.lastLoggedIn,
//     this.lastName,
//     this.level,
//     this.levelPercentage,
//     this.nickName,
//     this.numBooks,
//     this.numQuizzes,
//     this.parentEmail,
//     this.playerLevel,
//     this.points,
//     this.settings,
//     this.timestampCreated,
//     this.totalGameTime,
//     this.totalLoginTime,
//     this.userId,
//     this.userName,
//   });

//   String? accessCode;
//   String? classNames;
//   String? dateOfBirth;
//   bool? deleted;
//   bool? disabled;
//   String? email;
//   bool? excludeFromLeaderboard;
//   String? firstName;
//   bool? gameDisable;
//   String? gender;
//   String? id;
//   int? lastLoggedIn;
//   String? lastName;
//   String? level;
//   int? levelPercentage;
//   String? nickName;
//   int? numBooks;
//   int? numQuizzes;
//   String? parentEmail;
//   PlayerLevelClass? playerLevel;
//   int? points;
//   Settings? settings;
//   int? timestampCreated;
//   int? totalGameTime;
//   int? totalLoginTime;
//   String? userId;
//   String? userName;

//   factory ListElement.fromJson(Map<String, dynamic> json) => ListElement(
//         accessCode: json["accessCode"],
//         classNames: json["classNames"],
//         dateOfBirth: json["dateOfBirth"],
//         deleted: json["deleted"],
//         disabled: json["disabled"],
//         email: json["email"],
//         excludeFromLeaderboard: json["excludeFromLeaderboard"],
//         firstName: json["firstName"],
//         gameDisable: json["gameDisable"],
//         gender: json["gender"],
//         id: json["id"],
//         lastLoggedIn: json["lastLoggedIn"],
//         lastName: json["lastName"],
//         level: json["level"],
//         levelPercentage: json["levelPercentage"],
//         nickName: json["nickName"],
//         numBooks: json["numBooks"],
//         numQuizzes: json["numQuizzes"],
//         parentEmail: json["parentEmail"],
//         playerLevel: PlayerLevelClass.fromJson(json["playerLevel"]),
//         points: json["points"],
//         settings: Settings.fromJson(json["settings"]),
//         timestampCreated: json["timestampCreated"],
//         totalGameTime: json["totalGameTime"],
//         totalLoginTime: json["totalLoginTime"],
//         userId: json["userId"],
//         userName: json["userName"],
//       );

//   Map<String, dynamic> toJson() => {
//         "accessCode": accessCode,
//         "classNames": classNames,
//         "dateOfBirth": dateOfBirth,
//         "deleted": deleted,
//         "disabled": disabled,
//         "email": email,
//         "excludeFromLeaderboard": excludeFromLeaderboard,
//         "firstName": firstName,
//         "gameDisable": gameDisable,
//         "gender": gender,
//         "id": id,
//         "lastLoggedIn": lastLoggedIn,
//         "lastName": lastName,
//         "level": level,
//         "levelPercentage": levelPercentage,
//         "nickName": nickName,
//         "numBooks": numBooks,
//         "numQuizzes": numQuizzes,
//         "parentEmail": parentEmail,
//         "playerLevel": playerLevel?.toJson(),
//         "points": points,
//         "settings": settings?.toJson(),
//         "timestampCreated": timestampCreated,
//         "totalGameTime": totalGameTime,
//         "totalLoginTime": totalLoginTime,
//         "userId": userId,
//         "userName": userName,
//       };
// }
